Skip to content

Show fresh validator stats from /health-check and link to /console#2

Merged
raymondjacobson merged 3 commits into
mainfrom
validator-health-stats
May 20, 2026
Merged

Show fresh validator stats from /health-check and link to /console#2
raymondjacobson merged 3 commits into
mainfrom
validator-health-stats

Conversation

@raymondjacobson
Copy link
Copy Markdown
Contributor

@raymondjacobson raymondjacobson commented May 20, 2026

Summary

  • Replaces the old uptime/disk/db health rows on the validator node page with stats parsed from the validator /health-check endpoint: Node Type, Peers (recursive count over nested groupings), Current Height, Storage Type, Last Restart (computed from timestamp - uptime), and Git SHA (short, full on hover).
  • Adds a View Console button on the validator overview that opens ${endpoint}/console in a new tab.
  • Drops the IndividualNodeUptimeChart section for validators only. Content/Discovery pages are unchanged.

Test plan

  • Navigate to a validator node page — confirm the new six stats render and the View Console button opens the validator's console in a new tab.
  • Confirm Peers count matches reality on a node whose core.peers is grouped (e.g. inbound/outbound) — recursion sums across nested groups.
  • Confirm Content Node and Discovery Node pages are visually unchanged (still show disk/db/peer-reachability/uptime chart).
  • Confirm a validator with no core.peers shows 0 rather than blank.
  • Confirm fetch failure renders the "Failed to fetch health data" row instead of an empty section.

🤖 Generated with Claude Code

Replaces uptime/disk/db health on the validator node page with stats
parsed from the validator /health-check endpoint: node type, peer count
(recursive over nested groupings), current height, storage type, last
restart, and git SHA. Adds a "View Console" button that opens the
validator's /console in a new tab. Removes the IndividualNodeUptimeChart
section for validators.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 20, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
staking 43d00d0 Commit Preview URL May 20 2026, 10:31 PM

raymondjacobson and others added 2 commits May 20, 2026 15:28
ReactCountryFlag silently renders nothing for empty or invalid country
codes, leaving misaligned rows. Render a globe emoji with the same
spacing class as a fallback.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@raymondjacobson raymondjacobson merged commit b2cd6fd into main May 20, 2026
1 check passed
raymondjacobson added a commit to AudiusProject/apps that referenced this pull request May 21, 2026
… link to /console (#14376)

Mirrors
[OpenAudio/staking#2](OpenAudio/staking#2) on
the protocol dashboard — same code, applied here since the NodeOverview
/ useNodeHealth components are nearly identical between the two repos.

## Summary
- Replaces the old uptime/disk/db health rows on the validator node page
with stats parsed from the validator `/health-check` endpoint: **Node
Type**, **Peers** (recursive count over nested groupings like
`inbound`/`outbound`), **Current Height**, **Storage Type**, **Last
Restart** (computed from `timestamp - uptime`), and **Git SHA** (short,
full on hover).
- Adds a **View Console** button on the validator overview that opens
`${endpoint}/console` in a new tab.
- Drops the `IndividualNodeUptimeChart` section for validators only.
Content Node and Discovery Node pages are unchanged.
- Guards the `ServiceTable` country flag against missing or non-ISO-3166
alpha-2 codes (validators may not report a country) — renders a neutral
fallback instead.

### Implementation notes vs. the staking PR
- The View Console button reuses the existing `styles.modifyBtn` /
`styles.modifyBtnText` classes (matching the Manage Node button) instead
of the staking app's global `gradient-button manageNodeButton` classes,
which don't exist in this repo.

## Test plan
- [ ] Navigate to a validator node page — confirm the six new stats
render and the View Console button opens the validator's console in a
new tab.
- [ ] Confirm Peers count matches reality on a node whose `core.peers`
is grouped (e.g. inbound/outbound) — recursion sums across nested
groups.
- [ ] Confirm Content Node and Discovery Node pages are visually
unchanged (still show disk/db/peer-reachability/uptime chart).
- [ ] Confirm a validator with no `core.peers` shows `0` rather than
blank.
- [ ] Confirm fetch failure renders the "Failed to fetch health data"
row instead of an empty section.
- [ ] Confirm the ServiceTable falls back to a neutral 🏁 icon for rows
whose `country` is missing or not a 2-letter code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant